<template>
    <div>
        <el-page-header @back="back" content="分配记录">
        </el-page-header>
        <br />
        <el-card class="box-card">
            <el-form :inline="true" :model="formInline" class="demo-form-inline">
                <el-form-item>
                    <el-input v-model="formInline.user" placeholder="请输入客户名称" size="small"></el-input>
                </el-form-item>
                <el-form-item>
                    <el-select v-model="formInline.region" placeholder="请选择企业员工" size="small">
                        <el-option label="员工1" value="shanghai"></el-option>
                        <el-option label="员工2" value="beijing"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item>
                    <el-date-picker
                            size="small"
                            v-model="formInline.value"
                            type="daterange"
                            range-separator="至"
                            start-placeholder="开始日期"
                            end-placeholder="结束日期">
                    </el-date-picker>
                </el-form-item>
                <el-form-item>
                    <el-select v-model="formInline.jieti" placeholder="请选择接替状态" size="small">
                        <el-option label="已接替" value="shanghai"></el-option>
                        <el-option label="客户接替中" value="beijing"></el-option>
                        <el-option label="客户已拒绝" value="error"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item>
                    <el-button type="primary" size="small">查询</el-button>
                    <el-button size="small">重置</el-button>
                </el-form-item>
            </el-form>
        </el-card>
        <div class="interspaceH"></div>
        <el-card class="box-card">
            <div style="font-size: 14px">共1个待分配客户</div>
            <el-table
                    :data="tableData"
                    style="width: 100%">
                <el-table-column
                        prop="message"
                        label="客户信息">
                </el-table-column>
                <el-table-column
                        prop="name"
                        label="接替员工">
                </el-table-column>
                <el-table-column
                        prop="status"
                        label="转接状态">
                </el-table-column>
                <el-table-column
                        prop="time"
                        label="分配时间">
                </el-table-column>
                <el-table-column
                        label="操作">
                    <el-button type="text" @click="kehu">详情</el-button>
                </el-table-column>
            </el-table>
            <el-dialog title="已分配客户详情" :visible.sync="view" width="70%" :close-on-click-modal="false">
                <el-form ref="form" :model="form" label-width="80px">
                    <el-form-item label="客户信息">
                        <el-input v-model="form.message" :disabled="true"></el-input>
                    </el-form-item>
                    <el-form-item label="接替员工">
                        <el-input v-model="form.name" :disabled="true"></el-input>
                    </el-form-item>
                    <el-form-item label="转接状态">
                        <el-input v-model="form.status" :disabled="true"></el-input>
                    </el-form-item>
                    <el-form-item label="分配时间">
                        <el-input v-model="form.time" :disabled="true"></el-input>
                    </el-form-item>
                    <el-form-item>
                        <el-button @click="close">返回</el-button>
                    </el-form-item>
                </el-form>
            </el-dialog>
        </el-card>
    </div>
</template>

<script>
export default {
    data() {
        return {
            view: false,
            views: false,
            activeName : 'first',
            formInline: {
                user: '',
                region: '',
                value: '',
            },
            tableData: [{
                message: '意向客户',
                name: '王六',
                status: '客户接替中',
                time: '2021-01-15'
            }],
            form: {
                message: '意向客户',
                name: '王六',
                status: '客户接替中',
                time: '2021-01-15'
            },
        }
    },
    methods: {
        kehu() {
            this.view = true
        },
        close() {
            this.view = false;
        },
        back() {
            this.$emit("currentHandler", "default")
        }
    }
}
</script>

<style scoped>

</style>